package com.mdd.product.validate;

import com.mdd.common.base.page.PageValidate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ApiModel("商品搜素参数")
public class ProductSpuSearchValidate implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "分页信息")
    // 当前分页
    @DecimalMin(value = "1", message = "pageNo参数必须大于0的数字")
    @NotNull(message = "页码不能为空")
    public Integer pageNo = 1;

    // 每页条数
    @DecimalMin(value = "1", message = "pageSize参数必须是大于0的数字")
    @DecimalMax(value = "60", message = "pageSize参数必须是小于60的数字")
    @NotNull(message = "每页条数不能为空")
    private Integer pageSize = 20;

    @ApiModelProperty(value = "部门id")
    private String deptId;
    @ApiModelProperty(value = "商品名称")
    private String name;
    /**
     * 商品类型（0、长租商品 1、零售商品 2、批量采购商品）
     */
    private Integer pType;
}
